home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / tobby_on_ice.swf / scripts / frame_42 / DoAction.as
Text File  |  2011-08-19  |  3KB  |  97 lines

  1. this.stat = "standby";
  2. this.itemGetCnt = 0;
  3. this.scrollFlg = false;
  4. this.totalBonusCnt = 0;
  5. var nName = "tobbyMC";
  6. this.attachMovie("tobby",nName,_root.depthChar++);
  7. this[nName]._x = 320;
  8. this[nName]._y = 445;
  9. switch(this.stageNum)
  10. {
  11.    case 1:
  12.    case 2:
  13.    case 4:
  14.       var idName = "BG_base";
  15.       break;
  16.    case 3:
  17.       var idName = "BG_baseBonus";
  18.       break;
  19.    case 5:
  20.       var idName = "BG_baseJelly";
  21. }
  22. this.attachMovie(idName,"bgMC",this.depthBG++);
  23. this.bgMC._y = 55;
  24. if(this.stageNum != 3 && this.stageNum != 5)
  25. {
  26.    var nName = "bullMC";
  27.    this.attachMovie("bull",nName,_root.depthchar++);
  28.    this[nName]._x = 600;
  29.    this[nName]._y = 145;
  30. }
  31. this.speedList = [[0,-2,-3,-4,-5,-4,-3,-2,0],[0,-2,-3,-4,-5,-4,-3,-2,0],[0,-3,-2,-4,-6,-3,-2,-1,0],[0,-2,-6,-4,-5,-4,-3,-2,0],[0,-2,-4,-2,-6,-5,-3,-4,0]];
  32. this.iceMCList = [[_root.bgMC.groundTopMC],[],[],[],[],[],[],[],[_root.bgMC.groundBtmMC]];
  33. this.iceSizeList = [0,80,110,140,140,140];
  34. i = 0;
  35. while(i < 7)
  36. {
  37.    this.SetLocX = 0;
  38.    c = 0;
  39.    while(c < 8)
  40.    {
  41.       var nName = "ice" + String(i + 1) + String(c);
  42.       var sety = 160 + i * 38;
  43.       var depth = _root.depthIce + i * 100 + c * 10;
  44.       this.attachMovie("ice",nName,depth);
  45.       this[nName]._x = this.SetLocX;
  46.       this[nName]._y = sety;
  47.       this[nName].pdx = this.speedList[this.stageNum - 1][i + 1];
  48.       var iceNum = this.iceNumList[this.stageNum - 1][i][c];
  49.       this[nName].iceSize = iceNum;
  50.       this.SetLocX += this.iceSizeList[iceNum] + _root.randomInt(10) * 11;
  51.       this.iceMCList[i + 1].push(this[nName]);
  52.       c++;
  53.    }
  54.    cc = 0;
  55.    while(cc < this.iceMCList[i + 1].length)
  56.    {
  57.       this.iceMCList[i + 1][cc].resetLocX = this.SetLocX;
  58.       cc++;
  59.    }
  60.    i++;
  61. }
  62. var nName = "waterEffectMC";
  63. this.attachMovie("waterEffect",nName,_root.depthWaterEffect++);
  64. this[nName]._x = -100;
  65. this[nName]._y = 0;
  66. var itemSetList = [[1,3,2,5,2,3,2,5],[3,1,5,6,3,2,5,6],[],[9,8,7,6,5,7,3,2],[]];
  67. this.itemMCList = [];
  68. i = 0;
  69. while(i < itemSetList[this.stageNum - 1].length)
  70. {
  71.    var nName = "item" + String(i);
  72.    this.attachMovie("item",nName,this.depthItem++);
  73.    this[nName]._x = -200 + 100 * i;
  74.    this[nName]._y = 135;
  75.    this[nName].itemNum = itemSetList[this.stageNum - 1][i];
  76.    this.itemMCList.push(this[nName]);
  77.    i++;
  78. }
  79. this.attachMovie("score","scoreMC",this.depthIF++);
  80. this.scoreMC._x = 22;
  81. this.scoreMC._y = 64;
  82. this.attachMovie("lastPlayer","lastPlayerMC",this.depthIF++);
  83. this.lastPlayerMC._x = 507;
  84. this.lastPlayerMC._y = 64;
  85. if(this.stageNum != 3 && _this.stageNum != 5)
  86. {
  87.    this.attachMovie("myItem","myItemMC",this.depthIF++);
  88.    this.myItemMC._x = 22;
  89.    this.myItemMC._y = 430;
  90. }
  91. if(this.stageNum == 3)
  92. {
  93.    this.attachMovie("lastSec","LastSecMC",this.depthIF++);
  94.    this.LastSecMC._x = 380;
  95.    this.LastSecMC._y = 80;
  96. }
  97.